/**
 * 
 */
package com.jubao.ejb.entity;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * @author brother
 *
 */

@Entity
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE, region = "ContentCache", include = "all")
@Table(name = "userwebsite_tbl", schema = "jubao_database", uniqueConstraints = {})
public class UserWebsite extends GeneEntity implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -9068509020297592989L;

	@ManyToOne
	private User user;

	@Column(nullable = false)
	private Integer relationId;

	@ManyToOne
	private Website website;

	@Basic(fetch = FetchType.LAZY)
	@Column(length = 512)
	private String shortDesc;

	/**
	 * @return the user
	 */
	public User getUser() {
		return user;
	}

	/**
	 * @param user the user to set
	 */
	public void setUser(User user) {
		this.user = user;
	}

	/**
	 * @return the relationId
	 */
	public Integer getRelationId() {
		return relationId;
	}

	/**
	 * @param relationId the relationId to set
	 */
	public void setRelationId(Integer relationId) {
		this.relationId = relationId;
	}

	/**
	 * @return the website
	 */
	public Website getWebsite() {
		return website;
	}

	/**
	 * @param website the website to set
	 */
	public void setWebsite(Website website) {
		this.website = website;
	}

	/**
	 * @return the shortDesc
	 */
	public String getShortDesc() {
		return shortDesc;
	}

	/**
	 * @param shortDesc the shortDesc to set
	 */
	public void setShortDesc(String shortDesc) {
		this.shortDesc = shortDesc;
	}

}
